package com.example.springbootv1.service.impl;

import com.example.springbootv1.mapper.BillsMapper;

import com.example.springbootv1.service.BillsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.springbootv1.pojo.Bills;

import java.util.List;

@Service
public class BillsServiceImpl implements BillsService {
    @Autowired
    private BillsMapper billsMapper;

    @Override
    public List<Bills> getList() {
        return billsMapper.getList();
    }

    @Override
    public Bills queryById(Long id) {
        return billsMapper.queryById(id);
    }

    @Override
    public int insert(Bills bills) {
        int count = billsMapper.insert(bills);
        return count;
    }

    @Override
    public int update(Bills bills) {
        return billsMapper.update(bills);
    }

    @Override
    public int deleteById(Long id) {
        return billsMapper.deleteById(id);
    }

    @Override
    public Bills login(String name, String charType) {
        return billsMapper.login(name, charType);
    }

    @Override
    public List<Bills> getObjByObj(Bills bills) {
        return billsMapper.getObjByObj(bills);
    }

    @Override
    public List<Bills> getByFenYe(Bills bills) {
        return billsMapper.getByFenYe(bills);
    }

    @Override
    public int deleteBatch(List<Long> ids) {
        return billsMapper.deleteBatch(ids);
    }

    @Override
    public int getByFenYeCount(Bills bills) {
        return billsMapper.getByFenYeCount(bills);
    }
}
